package grape.attend.rest.classe.form;
import grape.common.rest.form.BaseForm;

import grape.common.rest.validation.form.Form;
import grape.common.rest.validation.form.IFormValid;
import grape.common.rest.validation.form.ValidContext;
import grape.common.rest.validation.form.ValidResult;
import grape.common.rest.validation.props.PropValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
 * <p>
 * 班次设置表
 * </p>
 *
 * @author yangwei
 * @since 2020-05-08
 */
@PropValid
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="班次设置表添加单对象")
public class ClasseCreateForm extends BaseForm {

    private static final long serialVersionUID = 1L;

    @NotEmpty(message="名称不能为空")
    @ApiModelProperty(value = "名称",required = true)
    private String name;

    @NotEmpty(message="上班时间不能为空")
    @ApiModelProperty(value = "上班时间",required = true)
    private String startTime;

    @NotEmpty(message="下班时间不能为空")
    @ApiModelProperty(value = "下班时间",required = true)
    private String endTime;

    @NotNull(message="是否有休息时间不能为空")
    @ApiModelProperty(value = "是否有休息时间",required = true)
    private Boolean isHasRest;

    @PropValid.DependCondition(message = "休息开始时间不能为空",dependProp = "isHasRest",ifEqual = "true")
    @ApiModelProperty(value = "休息开始时间")
    private String restStartTime;

    @PropValid.DependCondition(message = "休息结束时间不能为空",dependProp = "isHasRest",ifEqual = "true")
    @ApiModelProperty(value = "休息结束时间")
    private String restEndTime;

    @ApiModelProperty(value = "打卡设置")
    private String clockId;

    @ApiModelProperty(value = "备注")
    private String remark;

}
